package cn.bdqn.hospital.dao;

import cn.bdqn.hospital.entity.Comment;

import java.sql.SQLException;
import java.util.List;

public interface CommentDao {
    /**
     * 新增评论
     */
    public int add(Comment comment) throws SQLException;
    /**
     * 修改评论
     */
    public int update(Comment comment) throws SQLException;

    /**
     * 根据用户id删除评论
     */
    public int deleteByhzId(Integer hzId) throws SQLException;
    /**
     * 根据评论id删除评论
     */
    public int deleteByPlId(Integer plId) throws SQLException;
    /**
     * 根据用户id分页查询评论
     */
    public List<Comment> getCommentsByHzId(Integer hzId,Integer pageNo, Integer pageSize) throws SQLException;
    /**
     * 查询某用户下的评论总数
     */
    public long getCountByHzId(Integer hzId) throws SQLException;

}
